import router from "@system.router";
export default {
    data: {
        title: "World",
        array2: [
            {
                texta: "智能摄像机",
                textb: "上午12:00",
                textc: "检测到可疑目标，请及时查收",
            },
            {
                texta: "路由器",
                textb: "上午10:00",
                textc: "网路异常，无法连接网路，请及时查收",
            },
            {
                texta: "智能摄像机",
                textb: "昨天晚上8:00",
                textc: "网路异常，无法连接网路，请及时查收",
            },
            {
                texta: "路由器",
                textb: "昨天早上9:00",
                textc: "网路异常，无法连接网路，请及时查收",
            },
            {
                texta: "智能摄像机",
                textb: "周五",
                textc: "网路异常，无法连接网路，请及时查收",
            },
            {
                texta: "路由器",
                textb: "周四",
                textc: "网路异常，无法连接网路，请及时查收",
            },
            {
                texta: "智能摄像机",
                textb: "周四",
                textc: "网路异常，无法连接网路，请及时查收",
            },
        ],
        // 底部菜单栏
        menuData: [
            {
                imgSrc: "common/images_bottom_menu_bar/home.png",
                imgSrcActive: "common/images_bottom_menu_bar/home_active.png",
                title: "首页",
            },
            {
                imgSrc: "common/images_bottom_menu_bar/scenarios.png",
                imgSrcActive:
                    "common/images_bottom_menu_bar/scenarios_active.png",
                title: "场景",
            },
            {
                imgSrc: "common/images_bottom_menu_bar/message.png",
                imgSrcActive:
                    "common/images_bottom_menu_bar/message_active.png",
                title: "消息",
            },
            {
                imgSrc: "common/images_bottom_menu_bar/mine.png",
                imgSrcActive: "common/images_bottom_menu_bar/mine_active.png",
                title: "我的",
            },
        ],
        defaultIndex: 2,
    },

    change: function (e) {
        console.log("Tab index: " + e.index);
    },

    bottomNavigationBarClick(num) {
        this.defaultIndex = num;
        if (0 == this.defaultIndex) {
            router.replace({
                uri: "pages/home/home",
            });
        }

        if (1 == this.defaultIndex) {
            router.replace({
                uri: "pages/scene/p1",
            });
        }

        if (2 == this.defaultIndex) {
            router.replace({
                uri: "pages/message/message",
            });
        }

        if (3 == this.defaultIndex) {
            router.replace({
                uri: "pages/personal/personal",
            });
        }
    },
};
